home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 1999 #8 / 1999 CD 8 (black).iso / maskdemo / DATA1.CAB / Program_Executable_Files / mask.cs < prev    next >
Encoding:
Text File  |  1998-12-15  |  4.3 KB  |  156 lines

  1. #
  2. # Mask.cs
  3.  
  4. if test $2 == Init
  5.     set KQWorld::SaveGameName Game1Save
  6.  
  7.     # Load data files
  8.     loadKQ bounds.kq
  9.     loadKQ invinfo.itl
  10.     loadKQ monstats.mtl
  11.  
  12.     # Pop up the GUI screen
  13.     KQGame::selectScreen 0
  14.  
  15.     lockResource black.ppl
  16.     lockResource Menus.ppl
  17.  
  18. else if test $2 == NewWorld
  19.     
  20.     # names of the world's resource volumes
  21.     setcat KQWorld::VolumeSound            $KQWorld::Parent / Sound
  22.     setcat KQWorld::VolumeKq            $KQWorld::Name / Kq
  23.     setcat KQWorld::VolumeBMP            $KQWorld::Name / $KQGame::BitDepth Bit
  24.     setcat KQWorld::VolumeText            $KQWorld::Parent / $KQGame::Language
  25.     setcat KQWorld::VolumeArt            $KQWorld::Name / Resource
  26.     setcat KQWorld::VolumeGui            $KQWorld::Name / $KQGame::BitDepth Gui
  27.     setcat KQWorld::VolumePatch            $KQWorld::Name / Patch
  28.  
  29.     loadVolume KQWorld::VolumeSound        $KQWorld::VolumeSound
  30.     loadVolume KQWorld::VolumeKq            $KQWorld::VolumeKq
  31.     loadVolume KQWorld::VolumeBMP            $KQWorld::VolumeBMP
  32.     loadVolume KQWorld::VolumeText        $KQWorld::VolumeText
  33.     loadVolume KQWorld::VolumeArt            $KQWorld::VolumeArt
  34.     loadVolume KQWorld::VolumeGui            $KQWorld::VolumeGui
  35.     loadVolume KQWorld::VolumePatch        $KQWorld::VolumePatch
  36.  
  37.     KQGame::moveVolToFront cur
  38.  
  39.     # create the world
  40.     world.cs $KQWorld::Name Init
  41.  
  42.     # load the objects
  43.     world.cs $KQWorld::Name Load
  44.  
  45.     # Show the Game screen (moved to world.cs [10-13 abc])
  46.     #KQGame::selectScreen 1
  47.     loadPalettes 0
  48.  
  49.     purgeResource 4black.pbm
  50.     purgeResource 4red.pbm
  51.     purgeResource 4green.pbm
  52.     purgeResource 4blue.pbm
  53.     purgeResource Loading.pbm
  54.     purgeResource loading.ppl
  55.  
  56.     lockResource 4black.pbm
  57.     lockResource 4red.pbm
  58.     lockResource 4green.pbm
  59.     lockResource 4blue.pbm
  60.     lockResource stontran.pbm
  61.  
  62. else if test $2 == RestoreWorld
  63.     
  64.     echo Restore world $KQWorld::Name game $KQWorld::SaveGameName
  65.  
  66.     # VolumeSavedWorld is used for going through portals.
  67.  
  68.     # names of the world's resource volumes
  69.     setcat KQWorld::VolumeSound            $KQWorld::Parent / Sound
  70.     setcat KQWorld::VolumeKq            $KQWorld::Name / Kq
  71.     setcat KQWorld::VolumeBMP            $KQWorld::Name / $KQGame::BitDepth Bit
  72.     setcat KQWorld::VolumeText            $KQWorld::Parent / $KQGame::Language
  73.     setcat KQWorld::VolumeArt            $KQWorld::Name / Resource
  74.     setcat KQWorld::VolumeGui            $KQWorld::Name / $KQGame::BitDepth Gui
  75.     setcat KQWorld::VolumePatch            $KQWorld::Name / Patch
  76.     setcat KQWorld::VolumeSave            $KQWorld::SaveGameName
  77.     setcat KQWorld::VolumeSavedWorld        $KQWorld::SaveGameName / $KQWorld::Name
  78.  
  79.     KQGame::popGameKqVolume
  80.     loadVolume KQWorld::VolumeSound        $KQWorld::VolumeSound
  81.     loadVolume KQWorld::VolumeKq            $KQWorld::VolumeKq
  82.     loadVolume KQWorld::VolumeBMP            $KQWorld::VolumeBMP
  83.     loadVolume KQWorld::VolumeText        $KQWorld::VolumeText
  84.     loadVolume KQWorld::VolumeArt            $KQWorld::VolumeArt
  85.     loadVolume KQWorld::VolumeGui            $KQWorld::VolumeGui
  86.     loadVolume KQWorld::VolumePatch        $KQWorld::VolumePatch
  87.     loadVolume KQWorld::VolumeSave        $KQWorld::VolumeSave
  88.     loadVolume KQWorld::VolumeSavedWorld    $KQWorld::VolumeSavedWorld
  89.     KQGame::pushGameKqVolume
  90.  
  91.     KQGame::moveVolToFront cur
  92.  
  93.     # reset the NoName counter
  94.     loadKQ gameState.kq    
  95.  
  96.     # create the world
  97.     world.cs $KQWorld::Name Init
  98.  
  99.     # load the objects
  100.     world.cs $KQWorld::Name Load
  101.  
  102.     # done with the save game volume, so delete it
  103.     deleteObject KQWorld::VolumeSave
  104.     deleteObject KQWorld::VolumeSavedWorld
  105.  
  106.     # remove the variable
  107.     set KQWorld::VolumeSave
  108.  
  109.     # Show the Game screen (moved to world.cs [10-13 abc])
  110.     #KQGame::selectScreen 1
  111.     loadPalettes 0
  112.  
  113.     purgeResource 4black.pbm
  114.     purgeResource 4red.pbm
  115.     purgeResource 4green.pbm
  116.     purgeResource 4blue.pbm
  117.     purgeResource Loading.pbm
  118.     purgeResource loading.ppl
  119.  
  120.     lockResource 4black.pbm
  121.     lockResource 4red.pbm
  122.     lockResource 4green.pbm
  123.     lockResource 4blue.pbm
  124.     lockResource stontran.pbm
  125.  
  126. else if test $2 == UnloadWorld
  127.  
  128.     # KQWorld is deleted for us
  129.  
  130.     lockResource 4green.pbm 0
  131.     lockResource stontran.pbm 0
  132.  
  133.     purgeResources
  134.  
  135.     deleteObject KQWorld::VolumePatch
  136.     deleteObject KQWorld::VolumeSound
  137.     deleteObject KQWorld::VolumeKq
  138.     deleteObject KQWorld::VolumeBMP
  139.     deleteObject KQWorld::VolumeText
  140.     deleteObject KQWorld::VolumeArt
  141.     deleteObject KQWorld::VolumeGui
  142.  
  143.     # remove the variables
  144.     set KQWorld::VolumePatch ""
  145.     set KQWorld::VolumeKq ""
  146.     set KQWorld::VolumeBMP ""
  147.     set KQWorld::VolumeText ""
  148.     set KQWorld::VolumeArt ""
  149.     set KQWorld::VolumeSound ""
  150.     set KQWorld::VolumeGui ""
  151.  
  152. endif
  153. endif
  154. endif
  155. endif
  156.